package com.ruoyi.order.clients;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.order.clients.impl.MenuFeignCliensimpl;
import com.ruoyi.order.domain.TbMenu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(value = "ruoyi-menus",fallback = MenuFeignCliensimpl.class)
public interface MenuFeignCliens {


    /**
     *  id查询菜品对象 修改库存
     */
    @GetMapping(value = "menu/findByIdmenu")
    public TbMenu findByIdmenu(@RequestParam("id") Long id);



    /**
     * 修改菜品
     */
    @PostMapping("menu/updatemenu")
    public AjaxResult updatemenu(@RequestBody TbMenu tbMenu);


}
